<template>
    <view>
        <web-view :src="src" @load="bindload" @message="showMsg"></web-view>
        <!-- <web-view src="https://yludj.xetsl.com/s/1bCH1b" @load="bindload"></web-view> -->
    </view>
</template>

<script>
    export default {
        data() {
            return {
                src: 'https://bjielts-t.test.xdf.cn/listenScenario?u2at='
            }
        },
        onLoad() {
            // let device = 'pc'
            // wx.getSystemInfo({
            //     success (res) {
            //         console.log(res.platform)
            //         if (res.platform == 'ios' || res.platform == 'android') {
            //             device = 'mobile'
            //         }
            //     }
            // })
            const distinctID = wx.sensors.getAnonymousID()
            const token = uni.getStorageSync('Access-Token')
            if(process.env.NODE_ENV == 'development'){
                this.src = 'https://bjielts-t.test.xdf.cn/listenScenario?u2at='
				// this.src = 'http://10.152.164.98:5173/listenScenario?u2at='
                // this.src = 'http://10.152.164.121:5173/listenClass?u2at='
            } else {
                this.src = 'https://bjielts.xdf.cn/listenScenario?u2at='
            }
            this.src = this.src + token + '&t=' + new Date().getTime() + `distinctID=${distinctID}`
            console.log(this.src)
            
        },
        methods: {
            bindload() {
               
            },
            showMsg() {
                console.log('的弟弟')
            }
        }
    }
</script>

<style scoped>
    
</style>